import redis
from openai import OpenAI
import requests

DEBGUG = False
DEBGUG = True #本地环境测试
# if DEBGUG:
#     r = redis.Redis(host='127.0.0.1', port=6379, db=0)
# else:
#     r = redis.Redis(host='127.0.0.1', port=6379, db=0)

# # 尝试ping Redis服务器，以验证连接是否成功
# response = r.ping()
# if response:
#     print("Redis连接成功！")
# else:
#     print("Redis连接失败，但ping操作无异常。")


CONTENT='这是用户的评论，我需要让社区内不存在违法信息，请帮我审核是否可以发布，你只需要回复我"是"或者"否"'

########## Ai配置
client = OpenAI(
    # 若没有配置环境变量，请用百炼API Key将下行替换为：api_key="sk-xxx",
    api_key="sk-80343c1ec74f43bba6a8ad2d01d19068",
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)

# 模型列表，按顺序调用
MODEL_LIST = [
    #"deepseek-r1-distill-qwen-1.5b"
    "deepseek-r1-distill-llama-8b"
]

MAX_CALLS_PER_MODEL = 99999999
STATE_FILE = "./model_state.json"



ALIYUN_ACCESS_KEY_ID='LTAI5tHYNbhNyn5XxBFBbncW'
ALIYUN_ACCESS_KEY_SECRET='I3YpKTXaEECoi7kKR4h9JfFpqBDuC2'
ALIYUN_REGION_ID='oss-cn-hangzhou'
ALIYUN_OSS_ENDPOINT='oss-cn-hangzhou.aliyuncs.com'
ALIYUN_OSS_BUCKET='xingfanapp'
ALIYUN_GREEN_SCENE='postImageCheck'







